home *** CD-ROM | disk | FTP | other *** search
/ Ham Radio 2000 / Ham Radio 2000.iso / ham2000 / tcp_ip / watchdg2 / watchdog.doc < prev    next >
Text File  |  1992-11-01  |  5KB  |  139 lines

  1. Introduction
  2.  
  3. This is a watchdog reset circuit that works off of the serial
  4. data line between a PC and a TNC.  The watchdog resets itself
  5. whenever it sees activity on the transmit data line (indicating
  6. NOS or your BBS software is alive and kicking).  If there is no
  7. activity over a very long period of time (on the order of tens
  8. of minutes), the circuit will switch a transistor on to trigger
  9. whatever circuitry you wish.  Usually this will be connected to
  10. your CPU reset switch.  The circuit differs from the traditional
  11. 555 watchdog timer because such timers would require an
  12. extremely large value resistor and capacitor in the RC network
  13. to achieve very long timeouts.  Adjusting the timeout interval
  14. in such a circuit would also require a lot of patience. Instead,
  15. this circuit uses a binary counter as the timer.  The circuit
  16. can be assembled using readily available parts and may be
  17. adjusted quickly using an audio frequency counter.
  18.  
  19.  
  20. Circuit Description
  21.  
  22. U1 operates as a counter with an internal oscillator whose time
  23. constant is determined by R1 and C1.  Positive pulses from the
  24. serial data line pass through R3 to pin 12 setting the counter
  25. to zero.  D1, D2, and R3 limit the reset voltage between 0 and 5
  26. volts.  R4 is a pull-down resistor to enable counting when the
  27. data line is disconnected for testing.  When there is no
  28. activity on the serial line for a long time, U1 counts until pin
  29. 3 eventually goes high.  C2 charges through R5 producing a brief
  30. output pulse that triggers FET Q1 which resets the computer.  D3
  31. allows rapid discharge of C2 and prevents reverse bias on Q1
  32. when the counter is reset.  C3 serves as a power-supply
  33. decoupling capacitor.
  34.  
  35.  
  36. Parts List
  37.  
  38. Circuit components
  39. R1        1 Meg ohms, potentiometer
  40. R2        47 K ohms, 1/4 watt
  41. R3        15 K ohms, 1/4 watt
  42. R4,R5     100 K ohms, 1/4 watt
  43. C1,C2     .33 microfarad, ceramic disc
  44. C3        .1 microfarad, ceramic or tantalum
  45. D1,D2,D3  1N4148, general purpose diode
  46. Q1        VN10KM, enhancement-mode N-channel MOSFET
  47. U1        4060, CMOS binary counter
  48.  
  49. Hardware
  50. IBM PC board
  51. 16-pin IC socket
  52. Two sets of connectors:  one for the reset line, the other for
  53. the serial port.         
  54.  
  55. The most expensive part of this project is the PC bus perfboard. 
  56. The other parts are relatively inexpensive.  Virtually all parts
  57. are available from a good electronics store, except possibly Q1
  58. (TAPR sells VN10KMs for about a $1.00 each).  Note that you can
  59. use any reasonable substitute FET for Q1 as long as can trigger
  60. it from a 5-volt CMOS output line.
  61.  
  62.  
  63. Assembly Notes
  64.  
  65. A 5-volt source is available from pin B3 of a PC ISA bus.  Pin
  66. B1 is ground.  You can also use this circuit in a different type
  67. of computer in which case the power supply pinouts will be
  68. different on the bus.
  69.  
  70. R1 should be mounted in a way that makes it easy to adjust and
  71. measure the frequency when the board is inside your PC.
  72.  
  73. Do not hard-wire the watchdog board to either your serial line
  74. or your reset-switch.  It will be more convenient to use
  75. connectors of some sort.  If you use a DB-25/DB-9 to RJ-11
  76. adapter on the serial port, then a RJ-11 Y-connector makes for a
  77. convenient way to tap into your serial line.
  78.  
  79. The reset switch in most PCs simply grounds a capacitor on the
  80. motherboard.  The capacitor side of the switch should connect to
  81. the drain of Q1.  The ground side connects to the source of Q1.
  82.  
  83.  
  84. Installation and Testing
  85.  
  86. ( )  Ensure the computer is off and IC U1 is NOT installed in
  87. its socket.  Insert the board into a convenient slot on the PC
  88. motherboard.  Do not connect the reset line or serial line at
  89. this time.  Power up the computer and check for 5 volts at pin
  90. 16 of the IC socket.  
  91.  
  92. ( )  Connect the reset line to the board.  Place a temporary
  93. jumper between pin 16 and pin 3 of the U1 socket and check that
  94. your computer performs a hard reset. 
  95.  
  96. ( )  Power down.  Remove the jumper between pin 16 and pin 3 and
  97. insert U1 into its socket.  Adjust R1 to mid-range.  Power up
  98. and check pins 11 and 7 of U1 for signs of oscillation with a
  99. voltmeter or logic probe.
  100.  
  101. ( )  Connect the serial line and check pin 7.  It should
  102. continue to pulse.
  103.  
  104. ( )  Place a temporary jumper across D1 and make sure pin 7
  105. STOPS pulsing.  Remove the jumper.
  106.  
  107. ( )  Attach a frequency counter to pin 11 of U1.  The frequency
  108. at pin 3 of U1 will be the oscillator frequency divided by 2^14. 
  109. But Q1 triggers after only a half period when pin 3 goes high. 
  110. Hence the oscillator frequency at pin 11 should be
  111. f=(2^14)/(t*120) where t is the desired timeout value in minutes
  112. and f is in hertz.  Adjust R1 for the desired frequency.
  113.  
  114.  
  115. Accompanying Schematic Files
  116.  
  117. WATCHDOG.SCH        ORCAD schematic
  118. WATCHDOG.PS         PostScript output
  119. WATCHDOG.PCL        HP PCL (Laserjet) output
  120. WATCHDOG.HGL        HP Graphics Language (plotter) output
  121.  
  122.  
  123. Some ideas for improvement
  124.  
  125. You may want to parallel a touch-tone decoder reset line with
  126. Q1.  This gives you a fail-safe method of resetting NOS if it
  127. decides to lock up your computer but still send garbage through
  128. the serial port.  
  129.  
  130. Because the 4060 is a ripple counter, it is possible (although I
  131. think unlikely) that the circuit will cause an inadvertent
  132. reset.
  133.  
  134. Questions and comments about this circuit may be e-mailed to me. 
  135. Antonio Querubin
  136. AH6BW
  137. tony@mpg.phys.hawaii.edu
  138. ah6bw@ah6bw.ampr.org
  139.